package ligne2vie.topos.server.service;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

/**
 * Convenience class to obtain access to the database.
 * 
 * @author thuguerre
 * @since 1.0.0
 */
public final class PMF {

	/**
	 * Singleton reference to the database manager.
	 */
	private static final PersistenceManagerFactory pmfInstance = JDOHelper
			.getPersistenceManagerFactory("transactions-optional");

	/**
	 * Default constructor making this class singleton.
	 */
	private PMF() {
	}

	/**
	 * @return the database manager.
	 */
	public static PersistenceManagerFactory get() {
		return pmfInstance;
	}
}